﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("MsRobotEvent")]
    public partial class MsRobotEvent
    {
        /// <summary>
        ///  事件等级枚举
        /// </summary>
        public enum EventLevelEnum
        {
            Debug = 1,
        }

        /// <summary>
        /// 事件Id
        /// </summary>
        [Key]
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid RobotEventId { get; set; }

        /// <summary>
        /// 设备Id
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string RobotId { get; set; }

        /// <summary>
        /// 系统
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string SubSystem { get; set; }

        /// <summary>
        /// 事件等级
        /// </summary>
        [Column(TypeName = "int4")]
        public int EventLevel { get; set; }

        /// <summary>
        /// 事件内容
        /// </summary>
        [Column(TypeName = "varchar(1024)")]
        public string Message { get; set; }

        /// <summary>
        /// 事件发生时间
        /// </summary>
        [Column(TypeName = "timestamp")]
        public DateTime? Time { get; set; }

        [ForeignKey("RobotId")]
        public virtual MsRobot MsRobot { get; set; }
    }
}